package Class.Basis.littleProgram;
import java.util.Scanner;

class dishes {
    private final double prizeSoy_beanMilk = 3;
    private final double prizeDeep_friedDoughSticks = 1.5;
    private final double prizeBaozi = 1;
    private double sumPrize;

    public dishes() {
    }

    public dishes(int numSoy_beanMilk, int numDeep_friedDoughSticks, int numBaozi){
        sumPrize = prizeSoy_beanMilk * numSoy_beanMilk +
                prizeDeep_friedDoughSticks * numDeep_friedDoughSticks +
                prizeBaozi * numBaozi;
    }

    public double getSumPrize(int numSoy_beanMilk, int numDeep_friedDoughSticks, int numBaozi){
        sumPrize = prizeSoy_beanMilk * numSoy_beanMilk +
                prizeDeep_friedDoughSticks * numDeep_friedDoughSticks +
                prizeBaozi * numBaozi;
        return sumPrize;
    }

    public double getSumPrize(){
        return sumPrize;
    }
}

public class SimpleBreakfastShop {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("欢迎来到早餐店");
        System.out.println("豆浆：3元");
        System.out.println("油条：1.5元");
        System.out.println("包子：1元");
        System.out.print("你要买几袋豆浆:>");
        int numSoy_beanMilk = sc.nextInt();
        System.out.print("你要买几根油条:>");
        int numDeep_friedDoughSticks = sc.nextInt();
        System.out.print("你要买几个包子:>");
        int numBaozi = sc.nextInt();
        dishes dish = new dishes(numSoy_beanMilk, numDeep_friedDoughSticks, numBaozi);
        System.out.printf("总价为%.1f",dish.getSumPrize());
    }
}
